package com.ld.security.common.quartz.modules.job.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.ld.security.common.core.anno.IdKey;
import com.ld.security.common.core.base.column.MapJson;
import com.ld.security.common.mybatis.anno.SqlKey;
import com.ld.security.common.mybatis.base.entity.SuperEntity;
import com.ld.security.common.mybatis.constant.SqlCondition;

import com.ld.security.common.quartz.modules.job.constant.JobTaskConstant;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 任务类
 * 创建者	fulin
 * 创建时间	2018年3月28日
 */
@Data
@TableName("job_task")
public class JobTask extends SuperEntity {

    @ApiModelProperty("服务名称")
    @SqlKey
    private String appName;

    @ApiModelProperty("任务名称")
    @SqlKey(SqlCondition.like)
    private String jobName;

    @SqlKey(SqlCondition.like)
    @ApiModelProperty("任务分组")
    private String jobGroup;

    @SqlKey(SqlCondition.like)
    @ApiModelProperty("任务描述")
    private String content;

    @SqlKey(SqlCondition.like)
    @ApiModelProperty("执行类")
    private String jobClassName;

    @SqlKey
    @ApiModelProperty("作业状态")
    private JobTaskConstant.jobStatus jobStatus;

    @SqlKey(SqlCondition.like)
    @ApiModelProperty("定时表达式")
    private String  cronExpression;
    
    @ApiModelProperty("数据源")
    private MapJson dataMap;

    @IdKey(value = {
            "appName","jobGroup","jobName"
    })
    @Override
    public String getId() {
        return super.getId();
    }
}